﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using MyBlog.DataEntity;

namespace MyBlog.DataAccess
{
    internal class MessageMap : System.Data.Entity.ModelConfiguration.EntityTypeConfiguration<Tbl_Message>
    {
        public MessageMap()
        {
            this.HasMany(e => e.Tbl_MsgReply)
                  .WithRequired(e => e.Tbl_Message)
                  .HasForeignKey(e => e.MsgId)
                  .WillCascadeOnDelete(false);
            
        }
    }
}
